import * as service from "@/service";
import { IList } from "./interface";
import _ from "lodash";
const shopcar: IList = {
  namespaced: true,
  state: {
    shoplist: [],
  },
  actions: {
    async getshop({ commit }, { params }) {
      //type GET_LISTS
      const token = params.token;
      const result = await service.fetchShopget(token);
      commit({
        type: "GET_LISTS",
        payload: result?.data,
      });
    },
  },
  mutations: {
    GET_LISTS(state, { payload }) {
      state.shoplist = payload;
    },
  },
};

export default shopcar;
